package dyyx;

import org.apache.lucene.demo.IndexFiles;

public class IndexMain {
	
	public static void main(String[] args) throws Exception {
		
		// System.out.println("hello,lucene");
		// 存放索引的目录
		String indexPath = "/Users/dugang/work/lucene/";
		// 被索引文件目录 
		String docsPath = "/Users/dugang/fun/hellocode/web/docs/";
		String[] params = new String[]{"-index",indexPath,"-docs",docsPath,"-update"};
		
		// 调用官方demo 创建索引
		IndexFiles.main(params);
		
		// 字段  
		// path      StringField 
		// modified  LongPoint
		// contents  TextField
		
		
	
	}
}
